<?php
include(_DOC_ROOT.'classes/Content/Content.php');
include(_DOC_ROOT.'classes/Wedding/Wedding.php');
//MyDB::$db->debug = true;
$packageSelected =' class="selected"';
$param = array();
$record_prepage = $param['record_perpage'] = ($_REQUEST['record_perpage'])?$_REQUEST['record_perpage']:3;
$url =_SITE_URL.'wedding-packages/?';
array_push($jsFiles,  'general.js','package.js');
//array_push($cssFiles, 'gallery.css');
	$_tplName = array('package-refine.tpl','package-listing.tpl');
	//$brd_url['Packages'] = _SITE_URL.'packages/';
	//print_r($brd_url)
	$country_arr = getCountries();
	if($_REQUEST['country'] != '')
	$city_arr = getCities($_REQUEST['country']);
	$wtheme_arr = getWthemes();
	$wcategory_arr = getVenueTypes();
	
	if($_REQUEST['country'] != '')
		$param['country'] = $_REQUEST['country'];
	if($_REQUEST['city'] != '')
		$param['city'] = $_REQUEST['city'];
	if($_REQUEST['wtheme'] != '')
		$param['wtheme'] = $_REQUEST['wtheme'];
	if($_REQUEST['wcategory'] != '')
		$param['wcategory'] = $_REQUEST['wcategory'];
	if($_REQUEST['sort_package'] != '')
		$param['sort_package'] = $_REQUEST['sort_package'];
	foreach($param as $k => $v)
		$url .= "$k=".$v.'&';
	$rowCount = Wedding::getWeddingPackageCount($param);
	$paging = paging($rowCount,$url,$param['record_perpage']);
	$parr = Wedding::getWeddingPackage($_limit,$param);
	$radPackage = Wedding::getWeddingPackageRandom('',2);
	//echo '<pre>';print_r($parr);
	
$footer_links_tpl = 'footer_packages_links.tpl';
include(_SITE_TPL_PATH_.'site_main.tpl');
?>